<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.hs.pre.model.*" %>
<%@ page import="com.hs.*" %>
<%@ page import="com.hs.utils.*" %>
<%@ page import="com.hs.pre.page.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
List docList = (List)request.getAttribute("resultDoc");
if(docList == null)
  docList = new ArrayList();
Map  param = (Map)request.getAttribute("params");
String  resultNum = (String)request.getAttribute("resultNum");
String  paramStr = (String)request.getAttribute("paramStr");
String  start = (String)request.getAttribute("start");
String  startNum = (String)request.getAttribute("startNum");
String  endNum = (String)request.getAttribute("endNum");
String sortId="";
if(request.getAttribute("sortId") != null){
	sortId = (String)request.getAttribute("sortId");
}
String pageNum =  "0";

if(request.getAttribute("pageNum") != null)
  pageNum = (String)request.getAttribute("pageNum");
String title = Environment.getValue(Environment.PROP_APP_TITLE);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title><%=Environment.getValue(Environment.PROP_APP_TITLE) %></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
		 <LINK href="<%=path %>/app/css/search.css" type=text/css rel=stylesheet>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-right: 0px;
	margin-top: 0px;
	margin-bottom: 0px;
}
-->
</style>
  </head>
  
  <body cellSpacing="0" cellPadding="0">
    
<TABLE class="sprs" cellSpacing="0" cellPadding="0">
  <TBODY>
  <TR>
    <TD>    	
    </TD>
    <TD id="prs" noWrap="true" align="right">
    	<input type="button" value="方剂比较" onclick="compare();">
    	<FONT size="-1">约有<B id="ptr"><%=resultNum %></B>项搜索结果，以下是第<B id="psn"><%=startNum %></B><B>-</B><B id="pen"><%=endNum %></B>项</FONT>
    </TD>
      </TR>
  </TBODY>
</TABLE>
<TABLE class="csst" cellSpacing="0" cellPadding="0">
<TBODY> 
  <TR>
    <TD vAlign="top">
      <DIV style="BACKGROUND-COLOR: #e8eef7">
      <DIV id="spsd"></DIV>
      <DIV id="spds">
      </DIV>
    </DIV>
      <TABLE class="csst sprft" cellSpacing="0" border="0" cellpading="0"> 
        <TBODY id="spar">
        <TR class="sbr csmf">
          <TD class="sbarf" style="BORDER-RIGHT: #cccccc 1px solid">
            <DIV style="OVERFLOW: hidden; WIDTH: 170px; HEIGHT: 1px"></DIV>
            <SPAN style="FONT-WEIGHT: bold">方名 </SPAN> 
            <TABLE class="sbasc sbwd" cellSpacing="0" cellPadding="0">
              <TBODY>
              <TR>
                <TD>
                <INPUT class="sbas" name="fmSubset" id="fmSubset" style="CURSOR: default" maxLength="100" value="" onkeyPress="subSearch();"/>
                </TD>
                <TD></TD>
                 </TR></TBODY>
            </TABLE>
          </TD>
          <TD class="sbarf"  style="BORDER-RIGHT: #cccccc 1px solid" name="sbarf">
            <DIV style="OVERFLOW: hidden; WIDTH: 68px; HEIGHT: 1px"></DIV>
            <SPAN style="FONT-WEIGHT: bold">来源</SPAN>
            <DIV>
            <TABLE class="sbasc sbwd"  cellSpacing="0" cellPadding="0"> 
              <TBODY>
              <TR>
                <TD>
                <INPUT class="sbas" name="lySubset" id="lySubset" style="CURSOR: default" maxLength="100" value=""  onkeydown="subSearch();" />
                </TD>
                <TD></TD>
                </TR>
                </TBODY>
             </TABLE>
            
            </DIV>
            </TD>
          <TD class="sbarf"   style="BORDER-RIGHT: #cccccc 1px solid" name="sbarf">
            <DIV style="OVERFLOW: hidden; WIDTH: 68px; HEIGHT: 1px"></DIV>
            <SPAN style="FONT-WEIGHT: bold">药物组成</SPAN>
            <DIV>
            <TABLE class="sbasc sbwd"  cellSpacing="0" cellPadding="0">
              <TBODY>
              <TR>
                <TD>
                	<INPUT class="sbas" name="ywzcSubset" id="ywzcSubset" style="CURSOR: default" maxLength="100" value=""   onkeydown="subSearch();"/>
                </TD>
                <TD></TD></TR></TBODY></TABLE></DIV></TD>
          <TD class="sbarf"  style="BORDER-RIGHT: #cccccc 1px solid" name="sbarf">
            <DIV style="OVERFLOW: hidden; WIDTH: 68px; HEIGHT: 1px"></DIV>
            <SPAN  style="FONT-WEIGHT: bold">功效</SPAN>
            <DIV>
            <TABLE class="sbasc sbwd"   cellSpacing="0" cellPadding="0"> 
              <TBODY>
               <TR>
                <TD>
                   <INPUT class="sbas" name="gxSubset" id="gxSubset" style="CURSOR: default"  maxLength="100" value=""  onkeydown="subSearch();"/></TD>
                <TD>
                </TD>
                </TR>
                </TBODY>
            </TABLE>
           </DIV></TD>
          <TD class="sbarf"  style="BORDER-RIGHT: #cccccc 1px solid" name="sbarf">
            <DIV style="OVERFLOW: hidden; WIDTH: 68px; HEIGHT: 1px"></DIV> 
            <SPAN  style="FONT-WEIGHT: bold">主治</SPAN>
            <DIV>
            <TABLE class="sbasc sbwd"    cellSpacing="0" cellPadding="0"> 
              <TBODY>
              <TR>
                  <TD>
                	 <INPUT class="sbas" id="zzSubset" name="zzSubset" style="CURSOR: default" maxLength="100" value=""  onkeydown="subSearch();"/>
                  </TD>
                  <TD></TD>
                  </TR>
                </TBODY>
              </TABLE>
          </DIV></TD> 
          <TD style="DISPLAY: none"></TD>
          </TR>
        </TBODY>
	<form name="collectForm" action="select"> 
			 <TBODY id="spras">  
			 
			  <%if(docList != null&&docList.size()>0){
			  
			     String rowcss = "";
			     String rowId = "";
        		 for(int i = 0;i<docList.size();i++){ 
                       PreEntry entry = (PreEntry)docList.get(i);
                       rowId = "result_" + entry.getPreId();
                       if(i%2 == 0)
                             rowcss = "cssf GrayRow";
                       else
                              rowcss = "cssf";
      			  %>
      			  
			    <TR class="<%=rowcss %>" id="<%=rowId %>" style="BORDER-RIGHT: #cccccc 1px solid; LINE-HEIGHT: 140%"> 
			    <!-- name="pre_<%=entry.getId()%>" -->
				   <td><input type="checkbox" value="<%=entry.getId()%>" name="checkbox">&nbsp;&nbsp;<a href="<%=path %>/app/pre/search.do?type=simila&q=<%=entry.getId() %>&df=id" target="_blank"><%=entry.getFangm() %></a></td> 
			       <td ><%=Utilities.null2Blank(entry.getChufly()) %></td>
			       <td><%=Utilities.null2Blank(entry.getYaowzc()) %></td>
				   <td><%=Utilities.null2Blank(entry.getGongx()) %></td>
				    <td><%=Utilities.null2Blank(entry.getZhuz()) %></td>
				   <TD style="DISPLAY: none">
				   <input  type="hidden">
				   </TD>
			    </TR>  
			 </TBODY> 
			 <%}}else{ %>
			  <TR class="cssf GrayRow" id="sprr" style="BORDER-RIGHT: #cccccc 1px solid; LINE-HEIGHT: 140%"> 
				 <td colspan="5">
				 没有符合查询条件的结果。
			      </td>
			        
			    </TR> 
			 <%} %>
 <DIV class="csp cssf" id="sbso" style="WIDTH: 100px">11</DIV></TABLE>
    <DIV id="spnrs"></DIV></TD>
    <TD id="sprc"> 
      <DIV 
      style="PADDING-RIGHT: 2pt; PADDING-LEFT: 2pt; FONT-SIZE: 12px; PADDING-BOTTOM: 2pt; PADDING-TOP: 2pt; TEXT-ALIGN: right"><NOBR>
      <A id="spmlk_1" 
      style="PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 0pt; PADDING-TOP: 0pt"></A> 
      </NOBR></DIV>
      <DIV id="spff">
      <DIV style="WIDTH: 100%; PADDING-TOP: 5px">
      <TABLE>
          <TBODY>
	        <TR><TD>中药分布</TD></TR>
	        <TR><TD><a href="" rel="thumbnail" id="zyGraph-r"><img  style="WIDTH: 170px;" src="../images/imgloading.gif" id="zyGraph" /> </TD></TR>
	        <TR><TD>功效分布</TD></TR>
	        <TR><TD><a href="" rel="thumbnail" id="gxGraph-r"><img  style="WIDTH: 170px;" src="../images/imgloading.gif" id="gxGraph" /></TD></TR>
	        <TR><TD>主治分布</TD></TR>
	        <TR><TD><a href="" rel="thumbnail" id="zzGraph-r"><img  style="WIDTH: 170px;" src="../images/imgloading.gif" id="zzGraph" /></TD></TR>
	     </TBODY>
       </TABLE></DIV>
      <DIV id="spt"></DIV>
      </DIV></TD>
      </TR> 
      </TBODY>
      </TABLE>
<DIV id="sprq"></DIV>
<DIV id="sptc" style="DISPLAY: none"></DIV><BR></BR>
<CENTER id=pp>	

</CENTER>  
<DIV class="csp" id="sprp"></DIV>
<DIV style="DISPLAY: none"><INPUT id="ErrorCode" type="hidden"/></DIV>
<DIV id="spml" style="DISPLAY: none; BACKGROUND: #fff; FILTER: alpha(opacity=30); POSITION: absolute; opacity: 0.3">
<TABLE style="WIDTH: 100%; HEIGHT: 100%">
  <TBODY>
  <TR>
    <TD style="VERTICAL-ALIGN: middle; TEXT-ALIGN: center">c<IMG src="images/loading.gif"/></TD></TR>
  </TBODY>
  </TABLE>
  </DIV>
  </body>
</html>
<script type="text/javascript">
<!--
function setSearch(a)
{
 alert(a);
}
function setSortId(a)
{
 alert(a);
}
-->
</script>
